<%@ page language="java" import="java.util.*,shop.dao.*,shop.entity.*" 	pageEncoding="UTF-8"%>
<%@ page import="myservlet.OnlineCounter" %> 
<!DOCTYPE HTML>
<html>
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
  <meta charset="UTF-8">

  <meta name="description" content="">
  <meta name="keywords" content="">

  <title>注册账号</title>

    <link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
  <link href="css/style.css" media="screen" rel="stylesheet" type="text/css">
  <link href="css/grid.css" media="screen" rel="stylesheet" type="text/css">
   	<script type="text/javascript">
		function fun_check_form(){
			if(document.getElementById('userName').value==''){
				alert("请输入用户名。");
				return false;
			}else if(document.getElementById('password').value==""){
				alert("请输入密码。");
				return false;
			}else if(document.getElementById('phone').value==""){
				alert("请输入手机号码。");
				return false;
			}else if(document.getElementById('email').value==""){
				alert("请输入邮箱。");
				return false;
			}else  if(document.getElementById('password').value!=document.getElementById('password2').value){
		        alert("请输入一致密码。");
				return false;
			}else{
				return true;
			}	
		}
		</script> 
  <script src="js/jquery-1.7.2.min.js" ></script>
  <script src="js/html5.js" ></script>
  <script src="js/jflow.plus.js"></script>
  <script src="js/jquery.carouFredSel-5.2.2-packed.js"></script>
  <script src="js/checkbox.js"></script>
  <script src="js/radio.js"></script>
  <script src="js/selectBox.js"></script>	
<!-- 数据库连接 -->
<%
	ProductDao pt = new ProductDao();
	List P2 = pt.findProductBYBest();
	List Pl = pt.findProduct();
	TypeDao pt1 = new TypeDao();
   //导航栏 
	List pl2 = pt1.findmain_type();
	%>
	<!-- 数据库连接 -->   
</head>
<body>
  <div class="container_12">
    <div id="top">
      <div class="grid_3">
        <div class="phone_top">
          Call CN +110
        </div><!-- .phone_top -->
      </div><!-- .grid_3 -->

      <div class="grid_6">
        <div class="welcome">
   <% if(session.getAttribute("userSession")!=null){%>
        上次登录的时间:<%=session.getAttribute("lasttime") %>
   &nbsp;&nbsp;&nbsp;当前在线人数:<%=OnlineCounter.getOnline()%>
         <%}  %>
        </div><!-- .welcome -->
      </div><!-- .grid_6 -->

      <div class="grid_3">
        
      </div><!-- .grid_3 -->
    </div><!-- #top -->

    <div class="clear"></div>

    <header id="branding">
      <div class="grid_3">
        <hgroup>
          <h1 id="site_logo" ><a href="index.jsp" title=""><img height="119.8" width="130.8" src="images/login.jpg" alt="Online Store Theme Logo"/></a></h1>
          <h2 id="site_description">年轻人的第一个游戏网</h2>
        </hgroup>
      </div><!-- .grid_3 -->

      <div class="grid_3">
        <form class="search" action="catalog_search.jsp" method="post">
          <input type="text" name="search" class="entry_form" value="" placeholder="寻找游戏"/>&nbsp;
	</form>
      </div><!-- .grid_3 -->

      <div class="grid_6">
        <ul id="cart_nav">
          <li>
            <a class="cart_li" href="shop_cart.jsp"><span>购物车</span></a>
              </li>
            </ul>

        <nav class="private">
          <ul>
       <% if(session.getAttribute("userSession")==null){%> 
            <li><a href="login.jsp">登录</a></li>
            <li class="separator">|</li>
            <li><a href="Create user.jsp">注册</a></li>
        <%}else{  %>
       <li><a href="##.jsp">用户(<%=session.getAttribute("username") %>)身份(<%=session.getAttribute("userSession")%>)</a>
        <li class="separator">|</li>
       <% if(session.getAttribute("userSession").equals("管理员") ){ %><li><a href="admin/ht.jsp"><span>后台</span></a></li><% } %>
       <% if(session.getAttribute("userSession").equals("客户") ){ %><li><a href="Personal.jsp"><span>个人信息</span></a></li><% } %>
       <li class="separator">|</li>
       <li> <a href="deal/logout.jsp" >[注销]</a></li>
			    <%}  %>
          </ul>
        </nav><!-- .private -->
      </div><!-- .grid_6 -->
    </header><!-- #branding -->
  </div><!-- .container_12 -->
  
  <div class="clear"></div>
  
  <div id="block_nav_primary">
    <div class="container_12">
      <div class="grid_12">
        <nav class="primary">
          <ul>
            <li class="curent"><a href="index.jsp">首页</a></li>
                        <li><a href="blog_post.jsp">新闻</a></li>
                        <li><a href="catalog_grid.jsp">类型</a></li>
<%
	if (pl2.size() > 0) {
		for (int i = 0; i < pl2.size(); i++) {
			main_type pd2 = (main_type) pl2.get(i);			
%>
                <li><span><a href="catalog_grid.jsp?type=<%=pd2.getT_id()%>"><%=pd2.getT_type() %></a></span></li>
				<%}
				}else{ %>
                <li><span><a href="#">没有产品区</a></span></li>
				<%} %>
              </ul>
            </li>
          </ul>
        </nav><!-- .primary -->
      </div><!-- .grid_12 -->
    </div><!-- .container_12 -->
  </div><!-- .block_nav_primary -->
  
  <div class="clear"></div>
  
  <section id="main" class="entire_width">
    <div class="container_12">      
       <div id="content">
		<div class="grid_12">
			<h1 class="page_title">注册</h1>
		</div><!-- .grid_12 -->
		
		<div class="grid_4 adress">
			<h3>遇到问题？</h3>
			<p>请联系我们<a>fuliang@hotmail.com</a></p>
			<hr>						
                </div><!-- .adress -->		
		<div class="grid_8" >
			<form  class="contact" action="deal/do_Create.jsp" method="POST"  onSubmit="return fun_check_form()">
				<h2>仅需三步，你就能加入我们了</h2>				
				<div class="name">
					<strong>用户名:</strong><sup class="surely">*</sup><br/>
					<input class="" type="text" name="userName" id="userName"   onkeyup="value=value.replace(/[\W]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" />
				</div><!-- .name -->
				
				<div class="email">
					<strong>密码: </strong><sup class="surely">*</sup><br/>
					<input class="" type="text" name="password" id="password"  onkeyup="value=value.replace(/[\W]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" />
				</div><!-- .email -->
				
				<div class="email">
					<strong>再输入一次密码: </strong><sup class="surely">*</sup><br/>
					<input class="" type="text" name="password2" id="password2" onkeyup="value=value.replace(/[\W]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" />
				</div><!-- .email -->			
				
				<div class="phone">
					<strong><br><br><br><br>手机:</strong><sup class="surely">*</sup><br/>
					  <input class="" type="text" name="phone" id="phone" style="ime-mode:disabled" onkeydown="if(event.keyCode==13)event.keyCode=9" onkeypress="if ((event.keyCode<48 || event.keyCode>57)) event.returnValue=false" />				  
				</div><!-- .phone -->
				<div class="phone">
					<strong>邮箱:</strong><sup class="surely">*</sup><br/>
					  <input class="" type="email" name="email" id="email"  />				  
				</div><!-- .phone -->	
				<div class="submit">
					<input type="submit" name="B1" id="B1" value="注册"  />                           
				</div><!-- .submit -->
			</form><!-- .contact -->
                </div><!-- .grid_8 -->
       </div><!-- #content -->    
      <div class="clear"></div>
    </div><!-- .container_12 -->
  </section><!-- #main -->
  
  <div class="clear"></div>
    
  <footer>
  <div class="f_info">
      <div class="container_12">
        <div class="grid_6">
          <p class="copyright">BY 417工作室, 2015</p>
        </div><!-- .grid_6 -->

        <div class="grid_6">
          <div class="soc">
 
          </div><!-- .soc -->
        </div><!-- .grid_6 -->

        <div class="clear"></div>
      </div><!-- .container_12 -->
    </div><!-- .f_info -->
  </footer>
 
</body>
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
</html>